/*******************************************************************************
 * Copyright (c) 2010, 2030 www.itlaobing.cn
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 *******************************************************************************/
package cn.itlaobing.service;

import java.sql.SQLException;
import java.util.List;

import cn.itlaobing.dao.OrderDao;
import cn.itlaobing.exception.BusinessException;
import cn.itlaobing.model.OrderModel;


/** 
 * ClassName: OrderService <br/> 
 * Function:订单业务类 <br/> 
 * date: 2017年11月1日 下午2:40:30 <br/> 
 * 
 * @author wd
 * @version  
 * @since JDK 1.8 
 */
public class OrderService {
	private OrderDao od=new OrderDao();
	public List<OrderModel> queryAll()throws BusinessException{
		List<OrderModel>list=null;
		try {
			list=od.queryAll();
		} catch (ClassNotFoundException e) {
			e.printStackTrace();
			throw new BusinessException(e.getMessage());
		} catch (SQLException e) {
			e.printStackTrace();
			throw new BusinessException(e.getMessage());
		}finally {
			try {
				od.close();
			} catch (SQLException e) {
				e.printStackTrace();
				throw new BusinessException(e.getMessage());
			}
		}
		return list;
	}
}
